<template>
 <view style="width: 100%;height: 100%;padding-top: 200rpx;">
 		<view>
			<view style="margin-left: 60rpx;font-weight: 600;font-size: 52rpx;">欢迎登录</view>
			<view style="margin-left: 60rpx;">
				xxxxxxxxxxxxxxxxxxxxxxxxxx
			</view>
		</view>
 		<view>
 			<jump-login @smsCall="smsCall" @loginCall="pwdLogin"></jump-login>
			<view class="applyFor" @tap="goApplyFor()">
				申请成为骑手
			</view>
 		</view>
 	</view>
</template>

<script>
  export default {
    data() {
      return {}
    },
    methods: {
			smsCall(opm) {
				opm();
				console.log(opm(), '====================')
			},
      // 密码登录
      async pwdLogin(data) {
				console.log(data, '========>data')
        this.$store.dispatch('Login', data).then((res) => {
					if (res.code == '00000') {
						uni.switchTab({
							url: '/pages/index/index'
						})
					}
        }).catch((err)=>{
					console.log(err)
				})
      },
			goApplyFor() {
				uni.navigateTo({
					url: '/pages/joinin-rider/index'
				})
			}
    }
  }
</script>

<style lang="scss" scoped>
	.applyFor{
		margin: auto;
		width: 34%;
		padding: 10px;
		text-align: center;
		border-bottom: 1px solid #1C83FC;
		color: #1C83FC;
	}
</style>
